home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group99a.txt
/
000143_icon-group-sender _Tue Jun 22 12:34:32 1999.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
1KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id MAA01135
for icon-group-addresses; Tue, 22 Jun 1999 12:34:24 -0700 (MST)
Message-Id: <199906221934.MAA01135@baskerville.CS.Arizona.EDU>
To: icon-group@optima.CS.Arizona.EDU
Date: Tue, 22 Jun 1999 19:05:11 GMT
From: "Ian Trudel" <ian@monk.cgocable.ca>
Subject: Re: Assertions in Icon
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Well, I guess I cannot answer properly to this question since I am not an
Icon programmer. Though, I am studying Icon's implementation and I can tell
you a bit about. First of all, I know that you can use &trace diagnostic
facility for tracing. You could certainly assign a non-zero value to &trace
before evaluate "e" and put it back to zero after (yeah, if it fails, you'd
still have to halt the program). Anyway, Icon implementation is very
straightforward and at worst case, you could implement an assertion
function.
Ian
Kostas Oikonomou wrote in message
<199906221648.JAA25306@baskerville.CS.Arizona.EDU>...
:
:Hello,
:
:Does anyone have a suggestion about how to implement a procedure "assert",
:which, when called with an expression "e" as argument, implements
:
: e | stop("Assertion on line ", &line, " failed!")
:
:Here &line should be the line on which assert(e) appears.
:Thanks.
:
: Kostas Oikonomou
:
: